<?php

/**
 * Interface for OAuth signature methods
 * Edit from original library OAuth-PHP of Marc Worrell <marcw@pobox.com>
 *
 * @editor: Phong Linh <langxangvn@gmail.com>
 * @see http://code.google.com/p/oauth-php
*/
abstract class OAuthSignatureVerifier {
	/**
	 * Return the name of this signature
	 * 
	 * @return string
	 */
	abstract public function name();
	
	/**
	 * Create the signature for the given request
	 *
	 * @param string $base This is a description
	 * @param string $consumerSecret This is a description
	 * @param string $tokenSecret This is a description
	 * @return string This is the return value description
	 *
	 */	
	abstract public function create($base, $consumerSecret, $tokenSecret);

	/**
	 * Check if the request signature corresponds to the one calculated for the request.
	 * 
	 * @param string base data to be signed, usually the base string, can be a request body
	 * @param string consumerSecret
	 * @param string tokenSecret
	 * @param string signature from the request, still urlencoded
	 * @return string
	 */
	abstract public function verify($base, $consumerSecret, $tokenSecret, $signature);
}
?>